﻿namespace ORS.OrderRobot.Domain
{
    /// <summary>
    /// 账号的登机牌: 因为账号的登机牌信息经常在变，因此本地数据库需要存储一份登机信息方便查询
    /// </summary>
    public class AccountBoarding : Entity<int>
    {
        /// <summary>
        /// 所属账号
        /// </summary>
        public int AccountId { get; set; }

        public Account Account { get; set; }
        /// <summary>
        /// 生日
        /// </summary>
        public string Birthday { get; set; }
        /// <summary>
        /// 手机号
        /// </summary>
        public string Phone_Mobile { get; set; }
        /// <summary>
        /// 名(拼音大写)
        /// </summary>
        public string Last_Name { get; set; }
        /// <summary>
        /// 姓(拼音大写)
        /// </summary>
        public string First_Name { get; set; }

        /// <summary>
        /// 航班出发日期
        /// </summary>
        public DateOnly DepartureDate { get; set; }
        /// <summary>
        /// 航班出发时间
        /// </summary>
        public TimeSpan DepartureTime { get; set; }
        /// <summary>
        /// 航空公司(3K:捷星亚洲航空公司)
        /// </summary>
        public string Airlines { get; set; }
        /// <summary>
        /// 航空公司编号(3K)
        /// </summary>
        public string AirlinesNo { get; set; }
        /// <summary>
        /// 航班号
        /// </summary>
        public string FlightNo { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }
        /// <summary>
        /// 提货商店编号
        /// </summary>
        public string PickupStoreCode { get; set; }
        /// <summary>
        /// 登机牌关联的订单
        /// </summary>
        public ICollection<AccountOrder> Orders { get; set; } = new List<AccountOrder>();
        /// <summary>
        /// 是否同步到服务器
        /// </summary>
        public bool IsSyncToServer { get; set; } = false;
        /// <summary>
        /// 同步时间
        /// </summary>
        public DateTime? SyncTime { get; set; }
    }
}
